﻿using System.ComponentModel;
using System.Windows.Media;

namespace SuperFrame.Charts.Points
{
    /// <summary>
    /// ChartPoint
    /// </summary>
    public class ChartPoint : INotifyPropertyChanged
    {
       public string PointName { get; set; }

        private double xValue;
        internal double XValue
        {
            get { return xValue;}
            set { xValue = value; OnPropertyChanged("XValue"); }
        }
        private double yValue;
        internal double YValue
        {
            get { return yValue; }
            set { yValue = value; OnPropertyChanged("YValue"); }
        }

        private Brush color;
        internal Brush Color
        {
            get { return color; }
            set { color = value; OnPropertyChanged("Color"); }
        }

        private string describe;
        internal string Describe
        {
            get { return describe; }
            set { describe = value; OnPropertyChanged("Describe"); }
        }

        private string id;
        public string ID
        {
            get { return id; }
            set { id = value; OnPropertyChanged("ID"); }
        }


        protected void OnPropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(name));
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
    }
}
